Skip to content

Fix the selected background in Toolbar on Windows#3202

Open
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:fix/toolbar-background-win
Open

Fix the selected background in Toolbar on Windows#3202
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:fix/toolbar-background-win

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 7, 2026

Take the same approach as Button.java, manually fill the background for checked items and tell Windows to skip its own background:

Now in dark mode, for each toolbar item:

  • Checked: fill with getDifferentColor() (20% lighter shade)
  • Hot (hovered): fill with getSlightlyDifferentColor() (10% lighter shade)
  • Normal: fill with the background color

Then TBCDRF_NOBACKGROUND prevents Windows from painting its own white highlight on top.

Fixes: #217

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 7, 2026

image

See ticket for more screenshots

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Test Results (win32)

   28 files     28 suites   4m 46s ⏱️
4 653 tests 4 580 ✅ 73 💤 0 ❌
1 187 runs  1 163 ✅ 24 💤 0 ❌

Results for commit 0479587.

♻️ This comment has been updated with latest results.

Take the same approach as Button.java, manually fill the background for
checked items and tell Windows to skip its own background:

Now in dark mode, for each toolbar item:

- Checked: fill with getDifferentColor() (20% lighter shade)
- Hot (hovered): fill with getSlightlyDifferentColor() (10% lighter
shade)
- Normal: fill with the background color

Then TBCDRF_NOBACKGROUND prevents Windows from painting its own white
highlight on top.

Fixes: eclipse-platform#217
@vogella vogella force-pushed the fix/toolbar-background-win branch from 0c4acae to 0479587 Compare April 8, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows 11 - Selected Toolbar Icons look light (bad) in the dark theme

1 participant